package com.itheima.outputstream;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @Author 王加鑫
 * @Date 2021/5/19 11:36
 * @Version 1.0
 */
public class OutputStreamDemo2 {
    public static void main(String[] args) throws IOException {
        FileOutputStream outputStream = new FileOutputStream("day12_file&字节流",true);
        outputStream.write("静夜思".getBytes());
        //通用换行:System.lineSeparator()
        outputStream.write(System.lineSeparator().getBytes());
        outputStream.write("床前明月光".getBytes());
        outputStream.write(System.lineSeparator().getBytes());
        outputStream.write("疑是地上霜".getBytes());
        outputStream.write(System.lineSeparator().getBytes());
        outputStream.write("举头望明月".getBytes());
        outputStream.write(System.lineSeparator().getBytes());
        outputStream.write("低头思故乡".getBytes());
        outputStream.write(System.lineSeparator().getBytes());
        outputStream.close();
    }
}
